require 'singleton'
require 'rexml/document'

class Contexto
  include Singleton
    
  def initialize
    xml = File.new("config.xml")
	@doc = REXML::Document.new(xml)
	#doc.elements.each("config/db") {|db| @db = db.text}
	
  end
  
  def db
    ret = ""
    @doc.elements.each("Config/DataBase") {|db| ret = db.text}
	return ret
  end
  
  def lang
    ret = ""
	@doc.elements.each("Config/Language") {|lang| ret = lang.text}
	return ret
  end
  
end